package multithreading.homework.steamed;
//线程通信问题
public class Text {
    public static void main(String[] args) {
      Desk A = new Desk();
       new Thread(()->{while (true){
           A.put();
       }

       },"厨师1").start();
        new Thread(()->{
            while (true){
                A.put();
            }
        },"厨师2").start();
        new Thread(()->{
            while (true){
                A.eat();
            }
        },"客人1").start();
        new Thread(()->{
            while (true){
                A.eat();
            }
        },"客人2").start();
    }
}
